In flash memories, a threshold voltage of a cell changes according to wear of the cell, an inter-cell interference, data retention, or the like, and a bit error occurs at the time of reading data.